package cn.tnar.cloud.userservice.feign;

import cn.tnar.cloud.userservice.feign.fallback.ParkInfoFeignFallBackFactory;
import cn.tnar.cloud.userservice.util.ResultJson;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author dzx
 * @ClassName:
 * @Description:
 * @date 2019年04月09日 11:45:55
 */

@FeignClient(value = "park-service",fallbackFactory = ParkInfoFeignFallBackFactory.class)
public interface ParkInfoFeign {

    @GetMapping(value = "park/index")
    public String  index();

    /**
     * 传参数的时候一定要加上@RequestParam注解，否则对方服务无法识别参数;报405错误
     * @param id
     * @return
     */
    @GetMapping(value = "/park/getById")
    public ResultJson getById(@RequestParam("id") Long id);
}
